organisation files and test

add file organisation and create tests