added friction and switched location to a double