EDIT added whitespaces  and deleted useless comments, deleted useless line of codes