Made implementation better