Code sample based on my final year project.