solved, contains a lot of code (more complex functions than needed ; ) )