modified method to pass tests..needs work..