start working
done
bit of refactor