1024 implemented in C for use in terminal