improved classes thanks to Royal