my initial hacked version