refactored some spaces
fixed bugs working point