Readded most of functionalities, something still missing