cleaningg
fixing the legacy code