made the '=' function work with any input type