diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 75576ae5a3efb152e46fd66463b3c5f4115fec00..b834c8ae616bcba3c7243e12016d1d9ad6fe67e9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,6 +3,7 @@ image: docker:stable
 variables:
     DOCKER_DRIVER: overlay2
     GIT_STRATEGY: clone
+    GO111MODULE: "on"
 
 services:
     - golang
@@ -17,12 +18,10 @@ test:
         - mkdir -p /go/src/git.noc.ruhr-uni-bochum.de/danieljankowski/gomatrix
         # copy everything into the right place
         - cp -R $CI_PROJECT_DIR/* /go/src/git.noc.ruhr-uni-bochum.de/danieljankowski/gomatrix/.
-        # install the dep
-        - go get -u github.com/golang/dep/cmd/dep
         # change directory into the go package and prepare the tests
         - cd /go/src/git.noc.ruhr-uni-bochum.de/danieljankowski/gomatrix
         # install the dependencies
-        - dep ensure
+        - go mod vendor
         - mkdir report/
         # run the tests with coverage report
         - go test -count=1 -coverprofile report/cover.out -covermode=count ./...
@@ -44,12 +43,10 @@ lint:
         - mkdir -p /go/src/git.noc.ruhr-uni-bochum.de/danieljankowski/gomatrix
         # copy everything into the right place
         - cp -R $CI_PROJECT_DIR/* /go/src/git.noc.ruhr-uni-bochum.de/danieljankowski/gomatrix/.
-        # install the dep
-        - go get -u github.com/golang/dep/cmd/dep
         # change directory into the go package and prepare the tests
         - cd /go/src/git.noc.ruhr-uni-bochum.de/danieljankowski/gomatrix
         # install the dependencies
-        - dep ensure
+        - go mod vendor
         - mkdir report/
         # install golint
         - go get -u golang.org/x/lint/golint
@@ -70,12 +67,10 @@ memory-sanitizer:
         - mkdir -p /go/src/git.noc.ruhr-uni-bochum.de/danieljankowski/gomatrix
         # copy everything into the right place
         - cp -R $CI_PROJECT_DIR/* /go/src/git.noc.ruhr-uni-bochum.de/danieljankowski/gomatrix/.
-        # install the dep
-        - go get -u github.com/golang/dep/cmd/dep
         # change directory into the go package and prepare the tests
         - cd /go/src/git.noc.ruhr-uni-bochum.de/danieljankowski/gomatrix
         # install the dependencies
-        - dep ensure
+        - go mod vendor
         - mkdir report/
         # run the tests with coverage report
         - CC=clang go test -count=1 -msan -short $(go list ./... | grep -v /vendor/)
\ No newline at end of file
diff --git a/Gopkg.lock b/Gopkg.lock
deleted file mode 100644
index 316f3473f6928be617b9a5e12c7374cbc9c2d834..0000000000000000000000000000000000000000
--- a/Gopkg.lock
+++ /dev/null
@@ -1,33 +0,0 @@
-# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
-
-
-[[projects]]
-  digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec"
-  name = "github.com/davecgh/go-spew"
-  packages = ["spew"]
-  pruneopts = "UT"
-  revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73"
-  version = "v1.1.1"
-
-[[projects]]
-  digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe"
-  name = "github.com/pmezard/go-difflib"
-  packages = ["difflib"]
-  pruneopts = "UT"
-  revision = "792786c7400a136282c1664665ae0a8db921c6c2"
-  version = "v1.0.0"
-
-[[projects]]
-  digest = "1:972c2427413d41a1e06ca4897e8528e5a1622894050e2f527b38ddf0f343f759"
-  name = "github.com/stretchr/testify"
-  packages = ["assert"]
-  pruneopts = "UT"
-  revision = "ffdc059bfe9ce6a4e144ba849dbedead332c6053"
-  version = "v1.3.0"
-
-[solve-meta]
-  analyzer-name = "dep"
-  analyzer-version = 1
-  input-imports = ["github.com/stretchr/testify/assert"]
-  solver-name = "gps-cdcl"
-  solver-version = 1
diff --git a/Gopkg.toml b/Gopkg.toml
deleted file mode 100644
index b9a4fc463c0977aee901268c0a89ffef1cd3aa45..0000000000000000000000000000000000000000
--- a/Gopkg.toml
+++ /dev/null
@@ -1,34 +0,0 @@
-# Gopkg.toml example
-#
-# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
-# for detailed Gopkg.toml documentation.
-#
-# required = ["github.com/user/thing/cmd/thing"]
-# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
-#
-# [[constraint]]
-#   name = "github.com/user/project"
-#   version = "1.0.0"
-#
-# [[constraint]]
-#   name = "github.com/user/project2"
-#   branch = "dev"
-#   source = "github.com/myfork/project2"
-#
-# [[override]]
-#   name = "github.com/x/y"
-#   version = "2.4.0"
-#
-# [prune]
-#   non-go = false
-#   go-tests = true
-#   unused-packages = true
-
-
-[[constraint]]
-  name = "github.com/stretchr/testify"
-  version = "1.3.0"
-
-[prune]
-  go-tests = true
-  unused-packages = true
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000000000000000000000000000000000000..8b6d049fa4373bffb195ed8faeb31f344f7237a3
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,8 @@
+module git.noc.ruhr-uni-bochum.de/danieljankowski/gomatrix
+
+go 1.12
+
+require (
+	github.com/davecgh/go-spew v1.1.1 // indirect
+	github.com/stretchr/testify v1.3.0
+)
diff --git a/go.sum b/go.sum
new file mode 100644
index 0000000000000000000000000000000000000000..4f89841505b81f5596b6f3e084a0c4a8fa9177a4
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,8 @@
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
diff --git a/matrix.go b/matrix.go
index 5583123022202c378a201dd2513ee3ac2f7f1af0..5f1965eb93714530ec5716b9420bf1ddd857b7f3 100644
--- a/matrix.go
+++ b/matrix.go
@@ -287,7 +287,7 @@ func (f *F2) SwapCols(i, j int) error {
 // @return *F2
 func (f *F2) PermuteCols() *F2 {
 	// initialize the permuation matrix
-	permutationMatrix := NewF2(f.N, f.M)
+	permutationMatrix := NewF2(f.M, f.M)
 
 	// set the permutation matrix to the identity matrix of f
 	permutationMatrix.SetToIdentity()