FE done dirty code make it clean and mor comment if have time