created beta2 with better functions...