fixing spaces and changing funcs names