implemented rest of stuff