Useful code that could be used in future projects