added todo, fixed frame
added testing to seperate function