added method isOnset() and deleted unnecessary stuff