removed useless functions, added checkbox