fixed upper and added exception for input
reverted master to pre change branch