switch to palm direction method, cleaner code