cleaned up code, removed useless parts