got working post
cleaned up code