changes based on @coderoshi comments