removed unnecessary logs, cleaned up code