Working functionality with crashing.