everything works, needs comments