Deleted some useless code

This problem is now solved by getting the first free position available
TODO: make a function for that