write better code
notice corner cases