refactored alot to adhere to return() ans() principle