simplified event handlers code
added post preview btn